<?php
//ref: http://devzone.zend.com/article/3450 decorators etc.

	class Default_Form_Backend_Meeting extends Default_Form_Common
	{
	    public function init()
	    {
			parent::init();
	    }

		public function add()
	    {

			$label = $this->createElement('text', 'label');
			$label->setLabel('meeting-label')
					->setAttrib('size', 50)
	               	->setRequired(true)
	               	->addValidator('stringLength', false, array(3, 120))
	               	//->addFilter('StripTags')
	               	//->addFilter('StringTrim')
	               	;

			$meetingDatetime = $this->createElement('text', 'meeting_datetime');
			$meetingDatetime->setLabel('meeting-datetime')
					->setAttrib('size', 50)
	               	->setRequired(true)
	               	->addValidator('stringLength', false, array(3, 120))
	               	//->addFilter('StripTags')
	               	//->addFilter('StringTrim')
	               	;
	        $meetingDatetimeTrigger = $this->createElement('button', 'trigger_meeting_datetime');
	        $meetingDatetimeTrigger->setLabel('meeting-datetime');



			$participants = $this->createElement('textarea','participants');
			$participants->setLabel('meeting-participants')
					->setAttrib('rows', 10)
	               	->setRequired(true)
	               	//->addFilter('StripTags')
	               	//->addFilter('StringTrim')
	               	;

			$meetingItems = $this->createElement('textarea','meeting_items');
			$meetingItems->setLabel('meeting-items')
					->setAttrib('rows', 10)
	               	->setRequired(true)
	               	//->addFilter('StripTags')
	               	//->addFilter('StringTrim')
	               	;

			$meetingResults = $this->createElement('textarea','meeting_results');
			$meetingResults->setLabel('meeting-results')
					->setAttrib('rows', 20)
	               	->setRequired(true)
	               	//->addFilter('StripTags')
	               	//->addFilter('StringTrim')
	               	;

	        $isActive = $this->createElement('checkbox', 'is_active');
			$isActive->setLabel('is-active');


			$this->addElement($label)
			     ->addElement($meetingDatetime)
			     ->addElement($meetingDatetimeTrigger)
			     ->addElement($participants)
			     ->addElement($meetingItems)
			     ->addElement($meetingResults)
			     ->addElement($isActive)
			     ;



	    }

		public function edit()
	    {
	    	$this->add();

			$editId = $this->createElement('hidden', 'id');

			$this->addElement($editId);


	    }

	}
